import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from './App.tsx'
import { BrowserRouter } from 'react-router-dom'
import { initializeDatabase } from '@/Utils/localForage'
import { Provider } from 'react-redux'
import { store } from '@/store'
// 初始化数据库
initializeDatabase().then(() => {
  console.log('本地indexeddb数据库初始化成功');
}).catch((error) => {
  console.error('数据库初始化失败:', error);
});

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <Provider store={store}>
      <BrowserRouter >
        <App />
      </BrowserRouter>
    </Provider>
  </StrictMode>,
)
